package com.client.service;

import com.admin.bean.FindInfor;
import com.client.dbdao.FindLookDao;
import com.data.util.CheckDataUtils;
import com.data.util.FileResumeUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author Administrator
 */
@Service
public class FindLookService {

    @Autowired
    private FindLookDao findLookDao;


    public List<?> FindListService() {
        return findLookDao.FindListDao();

    }

    public FindInfor lookContentImageService(String id) {
        findLookDao.updateNumDao(id);
        if (CheckDataUtils.stringUtilsID(id)) {
            id = id.trim();
            List<FindInfor> list = findLookDao.lookContentImageDao(id);
            if (!list.isEmpty()) {
                return list.get(0);
            }

        }
        return null;
    }

    public byte[] lookImageService(String id) {

        if (CheckDataUtils.stringUtils(id)) {
            id = id.trim();
            return FileResumeUtils.readFindIcon(id);

        }
        return null;
    }


}
